factoring by grouping with multiple variables